import {Request, Response} from "express";
import e = require("express");
import * as minimist from 'minimist2';

const pargs =process.argv.slice(2);
const args = minimist(pargs);
const env = args["env"];
console.log(`Server setup is in-going with env=${env}`);

function Version(req: Request, resp: Response) {

}

const app = e()

app.use(e.json());
app.use(e.urlencoded());

app.get("/version", Version);

const port = 12345;
app.listen(port, ()=>{
    console.log(`Server is listening on port ${port}`);
});